package com.example.service.impl;
import com.example.service.OrderService; // 添加包名

public class OrderServiceImpl implements OrderService {
    // 原有代码不变
    @Override
    public void add(String pname, int number) {
        System.out.println("添加商品: " + pname + ", 数量: " + number);
    }

    @Override
    public void delete(String pname) {
        System.out.println("删除商品: " + pname);
    }

    @Override
    public int find(String pname) {
        int count = (int)(Math.random() * 10) + 1;
        System.out.println("查询商品: " + pname + ", 数量: " + count);
        return count;
    }
}
